package com.yxw.yx_hotel.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import lombok.Data;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import org.springframework.format.annotation.DateTimeFormat;

import java.util.Date;
import java.io.Serializable;


/**
 * @author liuxin
 * @create 2024-01-16 14:30:28
 * @description 用户信息表
 */
@Data
@TableName(value = "yx_sys_user")
@ApiModel(value = "用户信息表", description = "yx_sys_user")
public class YxSysUserEntity implements Serializable {
    private static final long serialVersionUID = 1L;

    /**
     * 主键id
     */
    @TableId(value = "user_id", type = IdType.AUTO)
    @ApiModelProperty(value = "id")
    private Long userId;

    /**
     * 手机号
     */
    @TableField(value = "mobile_phone")
    @ApiModelProperty(value = "手机号")
    private String mobilePhone;

    /**
     * 用户身份
     */
    @TableField(value = "user_identity")
    @ApiModelProperty(value = "用户身份")
    private String userIdentity;

    /**
     * 密码
     */
    @TableField(value = "password")
    @ApiModelProperty(value = "密码")
    private String password;

    /**
     * 登录账号
     */
    @TableField(value = "user_num")
    @ApiModelProperty(value = "工号")
    private String userNum;
    /**
     * 用户状态
     */
    @TableField(value = "user_status")
    @ApiModelProperty(value = "用户状态(0：禁用 1：启用)")
    private Integer userStatus;
    /**
     * 用户上级user_id
     */
    @TableField(value = "parent_user_id")
    @ApiModelProperty(value = "用户上级user_id")
    private Long parentUserId;
    /**
     * 用户邮箱
     */
    @TableField(value = "email")
    @ApiModelProperty(value = "用户邮箱")
    private String email;
    /**
     * 用户姓名
     */
    @TableField(value = "user_name")
    @ApiModelProperty(value = "用户姓名")
    private String userName;
    /**
     * 证件号码
     */
    @TableField(value = "identity_card_no")
    @ApiModelProperty(value = "证件号码")
    private String identityCardNo;
    /**
     * 登录时间
     */
    @TableField(value = "login_time")
    @ApiModelProperty(value = "登录时间")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date loginTime;
    /**
     * 头像路径
     */
    @TableField(value = "pic_url")
    @ApiModelProperty(value = "头像路径")
    private String picUrl;
    /**
     * 登录IP
     */
    @TableField(value = "login_ip")
    @ApiModelProperty(value = "登录IP")
    private String loginIp;
    /**
     * 上次登录时间
     */
    @TableField(value = "last_login_time")
    @ApiModelProperty(value = "上次登录时间")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date lastLoginTime;
    /**
     * 上次登录IP
     */
    @TableField(value = "last_login_ip")
    @ApiModelProperty(value = "上次登录IP")
    private String lastLoginIp;
    /**
     * 出生日期
     */
    @TableField(value = "birth_date")
    @ApiModelProperty(value = "出生日期")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date birthDate;
    /**
     * 入职时间
     */
    @TableField(value = "hire_date")
    @ApiModelProperty(value = "入职时间")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date hireDate;
    /**
     * 用户性别
     */
    @TableField(value = "gender")
    @ApiModelProperty(value = "用户性别（1：男 0：女 2未知）")
    private Integer gender;
    /**
     * 备注
     */
    @TableField(value = "remark")
    @ApiModelProperty(value = "备注")
    private String remark;
    /**
     * 创建时间
     */
    @TableField(value = "create_time")
    @ApiModelProperty(value = "创建时间")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date createTime;
    /**
     * 更新时间
     */
    @TableField(value = "update_time")
    @ApiModelProperty(value = "更新时间")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date updateTime;
    /**
     * 用户注册来源
     */
    @TableField(value = "user_source")
    @ApiModelProperty(value = "用户注册来源")
    private String userSource;
    /**
     * 用户类型 1:租户 2：SAAS管理员 3：租户子账户
     */
    @TableField(value = "user_type")
    @ApiModelProperty(value = "用户类型 1:租户 2：SAAS管理员 3：租户子账户")
    private Integer userType;
    /**
     * 租户ID
     */
    @TableField(value = "tenant_id")
    @ApiModelProperty(value = "客户ID")
    private Long tenantId;
    /**
     * 有效期始
     */
    @TableField(value = "start_time")
    @ApiModelProperty(value = "有效期始")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date startTime;
    /**
     * 有效期止
     */
    @TableField(value = "end_time")
    @ApiModelProperty(value = "有效期止")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date endTime;
    /**
     * 昵称
     */
    @TableField(value = "nick_name")
    @ApiModelProperty(value = "昵称")
    private String nickName;
    /**
     * 部门ID
     */
    @TableField(value = "dept_id")
    @ApiModelProperty(value = "部门ID")
    private Long deptId;
    /**
     * 岗位ID
     */
    @TableField(value = "post_id")
    @ApiModelProperty(value = "岗位ID")
    private Long postId;
    /**
     * 角色ID
     */
    @TableField(value = "role_id")
    @ApiModelProperty(value = "角色ID")
    private Long roleId;
    /**
     * 创建人ID
     */
    @TableField(value = "create_user_id")
    @ApiModelProperty(value = "创建人ID")
    private Long createUserId;
    /**
     * 创建人名称
     */
    @TableField(value = "create_user_name")
    @ApiModelProperty(value = "创建人名称")
    private String createUserName;
}
